import { getDictOptions } from "@/utils/dict";
import { Tag } from "antd";
import React from "react";

/**@description 根据传入的type值和value 控制要返回显示一些小东西，例如状态 */
const dictTag = ({ type = "COMMON_STATUS", value = 1 | "1" }) => {
    let dict = getDictOptions(type);
    return <Tag color={dict[value]?.color}>{dict[value]?.label}</Tag>
}
export default dictTag;